﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditArticle.aspx.cs" Inherits="Crm_EditArticle"
    MasterPageFile="~/Crm/crm.master" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="js/Color.js" type="text/javascript"></script>

    <script src="../xheditor/xheditor-1.1.10-zh-cn.min.js" type="text/javascript"></script>

    <script src="/plugins/filewatch/lhgdialog/lhgdialog.min.js" type="text/javascript"></script>

    <script type="text/javascript">


        $(document).ready(function()
        {
            $("#btnBrowser").dialog(
            {
                title: '选择文件', id: 'test9', page: '/plugins/filewatch/filelist.aspx?root=~/upload&fromid=<%=file1.ClientID %>&' + Math.random(), autoSize: false, width: 800, height: 500
            }
            );
        });
    </script>

    <script type="text/javascript">
        $(pageInit);
        function pageInit()
        {
            $('#<%=txtContent.ClientID %>').xheditor({ remoteImgSaveUrl: '/xheditor/saveremoteimg.aspx', upLinkUrl: "/xheditor/upload.aspx", upLinkExt: "zip,rar,txt", upImgUrl: "/xheditor/upload.aspx", upImgExt: "jpg,jpeg,gif,png", upFlashUrl: "/xheditor/upload.aspx", upFlashExt: "swf", upMediaUrl: "/xheditor/upload.aspx", upMediaExt: "wmv,avi,wma,mp3,mid", shortcuts: { 'ctrl+enter': submitForm} });
        }

        function submitForm() { }

        $(document).ready(function()
        {
            $("#btnSubmit").click(function()
            {
                if ($.trim($("#txtTitle").val()) == "")
                {
                    alert("请输入标题!");
                    $("#txtTitle").focus();
                    return false;
                }
            });
        });
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cbody" runat="Server">
    <table class="tblist" style="width: 850px; text-align: left">
        <colgroup>
            <col align="right" style="width: 100px;" class="bg1" />
        </colgroup>
        <tr class="ptitle" align="center">
            <td colspan="4" align="center">
                添加/修改文章
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                所属分类：
            </td>
            <td colspan="3">
                <asp:DropDownList ID="dropSort" runat="server" DataTextField="cname" DataValueField="bid">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                标题：
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtTitle" Width="400px" MaxLength="100" CssClass="inputtxt" runat="server"></asp:TextBox>
                <input name="DianCMS_Color" type="text" value="#000000" id="DianCMS_Color" class="in1"
                    onclick="rcolor(this,true)" title="点击选取颜色" style="background-color: #000000;
                    width: 80px; color: white;" />
                <asp:Button ID="btnDelete" runat="server" OnClientClick="return confirm('确定删除吗?');" OnClick="btnDelete_Click" Text="删除该文章" />
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                摘要：
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtBrief" Width="700px" Height="100px" TextMode="MultiLine" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                内容：
            </td>
            <td colspan="3">
                <textarea id="txtContent" rows="20" cols="7" runat="server" style="height: 500px;
                    width: 100%;"></textarea>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                是否显示：
            </td>
            <td colspan="3">
                <asp:CheckBox ID="chkIsShow" Checked="true" runat="server" /><input id="hidTypes"
                    runat="server" type="hidden" /><asp:Label ID="lblTip" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr style="display: none;">
            <td style="width: 100px">
                点击率：
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtDots" Text="0" Width="20px" MaxLength="5" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                发布时间：
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtPublishTime" Width="300px" CssClass="inputtxt" MaxLength="50"
                    runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                排序值：
            </td>
            <td colspan="3">
                <asp:TextBox ID="txtOrders" Text="0" Width="20px" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
                上传封面图片：
            </td>
            <td colspan="3">
                <input id="file1" type="text" runat="server" style="width: 300px;" /><input type="button"
                    id="btnBrowser" value="浏览服务器" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td colspan="3">
                <asp:Button ID="btnSubmit" runat="server" Text="提 交" OnClick="btnSubmit_Click" />
                &nbsp;
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="清 空,重新发布" />
                <asp:Label ID="lblResult" runat="server" Text="" ForeColor="Red"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
